cmake_minimum_required(VERSION 3.20)
project(cpp_learn)

set(CMAKE_CXX_STANDARD 20)

set(SOURCE_DIR "${CMAKE_SOURCE_DIR}/src")
file(GLOB_RECURSE SRC_FILE ${SOURCE_DIR}/*.cpp)

aux_source_directory(./src SOURCES)

message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")

foreach (source_file ${SRC_FILE})
    get_filename_component(filename ${source_file} NAME_WE)
    message("${source_file}")
    add_executable(${filename} ${source_file})
endforeach (source_file ${SRC_FILE})
